﻿#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QSqlTableModel>
#include <QMessageBox>


namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QSqlTableModel*,QWidget *parent = nullptr);
    ~Dialog();

private slots:
    void on_combType_currentIndexChanged(int index);

    void on_combVender_currentIndexChanged(int index);

    void on_combName_currentIndexChanged(int index);

    void on_btnCancel_clicked();

    void on_btnOk_clicked();

private:
    Ui::Dialog *ui;

    QSqlTableModel* m_whModel;

    void init();

    void updateType();

    void updateVender();

    void updateProName();
};

#endif // DIALOG_H
